package com.example.demo.controller;

import com.example.demo.entity.SysUser;
import com.example.demo.mapper.UserMapper;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by binling on 2017/8/16.
 */
@Controller
public class IndexController {

    @Resource
    private UserMapper userMapper;
@RequestMapping(value={"/","index"})
    public String Index(Model model){
    SysUser sysUser=new SysUser();
    sysUser.setName("测试uoi");
    sysUser.setPhone("123123123");
    List<SysUser> list= userMapper.getAll();
    model.addAttribute(sysUser);
        return "Index";
    }
}
